<include file="Inc/html_header" />
<div>
    <table class="table table-bordered table-hover">
        <thead>
            <tr>
                <th>表名</th>
                <th >表备注</th>
                <th width="150">编码</th>
                <th width="100">表引擎</th>
                <th width="90">数据量</th>
                <th width="90">数据大小</th>
                <th width="152">创建时间</th>
                <th width="152">更新时间</th>
                <th width="130">操作</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach($list as $table){ ?>
            <tr>
                <td><?php echo $table['name'];?></td>
                <td><?php echo $table['comment'];?></td>
                <td><?php echo $table['collation'];?></td>
                <td><?php echo $table['engine'];?></td>
                <td><?php echo $table['rows'];?></td>
                <td><?php echo format_bytes($table['data_length']);?></td>
                <td><?php echo $table['create_time'];?></td>
                <td><?php echo $table['update_time'];?></td>
                <td class="action">
                    <a class="btn btn-sm btn-warning" href="<?php echo U('database/optimize', array('table'=>$table['name']));?>">优化表</a>
                    <a class="btn btn-sm btn-info" href="<?php echo U('database/repair', array('table'=>$table['name']));?>">修复表</a>
                </td>
            </tr>
            <?php } ?>
        </tbody>
    </table>
</div>
<include file="Inc/html_footer" />